package com.ylb.rent.entity.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ylb.rent.entity.Order;
import lombok.*;

import java.io.Serializable;
import java.sql.Date;
import java.sql.Timestamp;

/**
 * @AUTHOR:游李滨
 * @DATE:2023/7/5 10:03
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Builder
public class OrderVo implements Serializable {
    private static final long serialVersionUID = 1L;

    private long id;
    private long userId;
    private String nickName;
    private String orderNo;
    private double totalAmount;
    private double paymentAmount;
    private java.sql.Timestamp paymentTime;
    private long status;
    private java.sql.Timestamp createTime;
    private java.sql.Timestamp updateTime;
    private java.sql.Date fromDate;
    private java.sql.Timestamp toDate;

    public OrderVo(Order order) {
        this.id = order.getId();
        this.userId = order.getUserId();
        this.orderNo = order.getOrderNo();
        this.totalAmount = order.getTotalAmount();
        this.paymentAmount = order.getPaymentAmount();
        this.paymentTime = order.getPaymentTime();
        this.status = order.getStatus();
        this.createTime = order.getCreateTime();
        this.updateTime = order.getUpdateTime();
        this.fromDate= order.getFromDate();
        this.toDate = order.getToDate();
    }


}
